package experiment.e05.code.ch04.v1;

import experiment.e05.code.ch04.v0.Point;

/**
 * @author thinkpad - 83start
 * @version v1.0
 * @create 2022/10/13 16:15
 * @package experiment.e05.code.ch04.v1
 * @description 文件说明
 */

public class Test1 {
    public static void main(String[] args) {
        // 圆
        System.out.println("========== 测试 circle ==========");
        Point circlePoint = new Point(3, 4);
        Circle circle = new Circle(4);
        circle.setPoint(circlePoint);
        System.out.println("圆形面积：" + circle.getArea());
        System.out.println(circle.toString());

        // 矩形
        System.out.println("\n========== 测试 rectangle ==========");
        Point rectanglePoint = new Point(4, 9);
        Rectangle rectangle = new Rectangle(3, 5);
        rectangle.setPoint(rectanglePoint);
        System.out.println("矩形面积：" + rectangle.getArea());
        System.out.println(rectangle.toString());

    }
}
